473,418 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Converting .dbf to sql server table...batch file? command line?

My client will be receiving a .dbf file which needs to be uploaded
into a sql server database table (as an append) every week. They are
NOT computer savvy and I would like to automate this process rather
than go into enterprise manager and run data transformation.

Is there any way to write a batch file or a set of command lines which
will do this?

Thanks.

Monica
Jul 20 '05 #1
3 15830
mo****@datashark.net (Monica J. Braverman) wrote in message news:<d7**************************@posting.google. com>...
My client will be receiving a .dbf file which needs to be uploaded
into a sql server database table (as an append) every week. They are
NOT computer savvy and I would like to automate this process rather
than go into enterprise manager and run data transformation.

Is there any way to write a batch file or a set of command lines which
will do this?

Thanks.

Monica

DTS package would probably be the easiest solution. Create the package
as an import from the .dbf into the approriate table and then run it
with each new .dbf received. If running DTS packages is a bit
'complex' for your users you could wrap it up in an applicaion/wizard
(eg in VB) and execute it that way.
Jul 20 '05 #2
mo****@datashark.net (Monica J. Braverman) wrote:
My client will be receiving a .dbf file which needs to be uploaded
into a sql server database table (as an append) every week. They are
NOT computer savvy and I would like to automate this process rather
than go into enterprise manager and run data transformation.

Is there any way to write a batch file or a set of command lines which
will do this?


You might create a DTS package on the server, then create a batch file
to access it that calls the DTSRUN.exe program. I have a batch file
with this as the command line:
dtsrun /e /n"dtspackagename" /sSQLServerName and it works very well.
hth,
Myron
Jul 20 '05 #3
Hi,
you can automate your process using a command prompt utility named
"bcp"; if you try to execute this command you get the syntax:

C:\>bcp
usage: bcp {dbtable | query} {in | out | queryout | format} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n native type] [-c character type] [-w wide
character type]
[-N keep non-text native] [-V file format version] [-q quoted
identifier]
[-C code page specifier] [-t field terminator] [-r row
terminator]
[-i inputfile] [-o outfile] [-a packetsize]
[-S server name] [-U username] [-P password]
[-T trusted connection] [-v version] [-R regional
enable]
[-k keep null values] [-E keep identity values]
[-h "load hints"]

Another way is to use the T-SQL command "BULK INSERT".
You can find explanations on your MS-SQL documentation.

Bye.

mo****@datashark.net (Monica J. Braverman) wrote in message news:<d7**************************@posting.google. com>...
My client will be receiving a .dbf file which needs to be uploaded
into a sql server database table (as an append) every week. They are
NOT computer savvy and I would like to automate this process rather
than go into enterprise manager and run data transformation.

Is there any way to write a batch file or a set of command lines which
will do this?

Thanks.

Monica

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup)...
1
by: Mario Crevits | last post by:
My name is Mario Crevits, I'm from Belgium (Roeselare) and I'm working with Access97 for several years now. We are in an Access97-2000 migration project. I'm writing a wizard for the end-users to...
6
by: Charles Neitzel | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
2
by: Petr PALAS | last post by:
Hi, when I open ANY ASP.NET application on my computer I get this message: ---------------------------------------------------------------------------- ---- Server Application Unavailable ...
5
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE...
1
by: Reza Sadeghi | last post by:
Hi I am getting this error when I tried to browse any asp.net in visual studio.net. I can build the project but when I try to run and debug the project I get error message that "Unable to start...
5
by: Neil | last post by:
I am getting time-out errors when I try to perform a simple delete on a linked server. The command is: Delete From MyTable Where PKID=12345 I have tried executing this command directly from...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.